-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support create pipeline to intrgrate scanner to cicd #2574
Conversation
one pipeline to many pipeline node
switch model.PipelineNodeType(node.NodeType) { | ||
case model.NodeTypeAudit: | ||
var cmdUsage = "#使用方法#\n1. 确保运行该命令的用户具有scannerd的执行权限。\n2. 在scannerd文件所在目录执行启动命令。\n#启动命令#\n" | ||
baseCmd := "./scannerd %s --host=\"%s\" --port=\"%s\" --dir=\"%s\" --token=\"%s\"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
智能扫描也有类似的展示command的功能,是不是可以放一起
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get,这一点后续看一下怎么合在一起
func (svc PipelineSvc) newToken(userId, version, uuid string) (string, error) { | ||
token, err := dmsCommonJwt.GenJwtToken( | ||
dmsCommonJwt.WithUserId(userId), | ||
dmsCommonJwt.WithExpiredTime(365*24*time.Hour), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
期望有过期时间吗,一年后咋办
Name string `gorm:"type:varchar(255);not null" json:"name"` // 节点名称 | ||
NodeType string `gorm:"type:varchar(20);not null" json:"node_type"` // 节点类型 | ||
NodeVersion string `gorm:"type:varchar(255)" json:"node_version"` // 节点版本 | ||
InstanceName string `gorm:"type:varchar(255)" json:"instance_name,omitempty"` // 数据源名称,在线审核时必填 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
数据源名称与dms耦合了,使用instance_id
}) | ||
} | ||
|
||
func (svc PipelineSvc) DeletePipeline(projectUID string, pipelineID uint) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
projectUID 未用上
type PipelineNode struct { | ||
gorm.Model | ||
PipelineID uint `gorm:"type:bigint;not null;index" json:"pipeline_id"` // 关联的流水线ID | ||
UUID string `gorm:"type:varchar(255);not null" json:"uuid"` // 节点uuid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要有唯一约束
关联的 issue
#2564
描述你的变更
确认项(pr提交后操作)
Tip
请在指定复审人之前,确认并完成以下事项,完成后✅
not_compatible
need_update_doc